<template>
    <form>
        <table>
            <h2>新增</h2>
            <tbody>
                <tr>
                    <td>书名</td>
                    <td><input type="text" placeholder="书名"></td>
                </tr>
                <tr>
                    <td>作者</td>
                    <td><input type="text" placeholder="作者"></td>
                </tr>
                <tr>
                    <td>简介</td>
                    <td><input type="text" placeholder="简介"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" @click="btnSave"></td>
                    <td><input type="button" value="取消" @click="btnCancel"></td>
                </tr>
            </tbody>
        </table>
    </form>
</template>
<script setup>
import { useRouter } from 'vue-router';

let router =useRouter()

function btnSave(){
    router.push('/books')
}
function btnCancel(){
    router.push('/books')
}

</script>